subroutine check_readdiss(cunit)
  use param
  use global_param,only:n_point_type
  use label_data_param,only:n_obj_type
  use label_data_param,only:obj_type
  implicit none

  integer,intent(in) :: cunit

  integer :: i,j,k,n,in1,in2,in3
  integer :: pos1,pos2
  character(len=len_linebuf) :: str

  in1=1
  in2=2
  in3=3

  call log_msg1(cunit,"")
  call log_msg1(cunit,"Checking dissociation file...")
  call log_msg1(cunit,"")

  write(str,'("Number of labels=",i0)') n_obj_type
  call log_msg1_indent(cunit,in1,str)

  do i=1,n_obj_type
     pos1=16
     ! Original labels
     write(str(1:pos1),'("[",i5.5,"]",1x,a8)') i,obj_type(i)%name
     ! Configuration 
     do j=1,n_point_type
        pos2=pos1+10
        write(str(pos1+1:pos2),'(3x,i7)') obj_type(i)%config(j)
        pos1=pos2
     end do
     ! Total size
     pos2=pos1+9
     write(str(pos1+1:pos2),'(1x,i8)') obj_type(i)%total_size
     ! write the label info.
     call log_msg1_indent(cunit,in1,str(1:pos2))

     ! does diss
     if (obj_type(i)%does_diss) then
        write(str,'("> Dissociatiable (",i0,")")') &
             obj_type(i)%diss_type
        call log_msg1_indent(cunit,in2,str)        
        do j=1,obj_type(i)%diss_type
           write(str(1:12),'("Eb=",1pe8.2,",")') &
                obj_type(i)%diss_eb(j)
           write(str(13:24),'("nu=",1pe8.2,",")') &
                obj_type(i)%diss_nu(j)
           write(str(25:36),'("Rd=",1pe8.2,1x)') &
                obj_type(i)%diss_rd(j)
           pos1=36
           do k=1,obj_type(i)%n_diss(j)
              pos2=pos1+5
              n=obj_type(i)%diss_obj(j)%diss_type(k)
              write(str(pos1+1:pos2),'(a5)') obj_type(n)%name
              pos1=pos2
           end do
        call log_msg1_indent(cunit,in2,str)
        end do
     else
        write(str,'("> Indissociatiable")')
        call log_msg1_indent(cunit,in2,str)
     end if
  end do

  return

end subroutine check_readdiss
